import org.jruby.Ruby
import org.jruby.javasupport.JavaEmbedUtils

def results

try {
	def script = request.getParameter("script")
	def runtime = JavaEmbedUtils.initialize(Collections.EMPTY_LIST)
	results = runtime.evalScriptlet(script)
}
catch(e) {
	results = e.toString()
}

println "Results are [$results]"